package cn.tedu.innerx;
//静态内部类
public class StaticInnerClass {
    public static void main(String[] args) {
        //调用内部类的method方法
//        new Outer2().inner2.method();
//        Outer2.inner2.method();
        //调用内部类的method方法
//        new Outer2().new Inner2();
        Outer2.Inner2 inner2 = new Outer2.Inner2();
    }
}
class Outer2{
    int num = 5;
   // static Inner2 inner2 = new Inner2();
    //静态内部类
    public static class Inner2 extends Father implements Interf{
        public Inner2(){
            System.out.println("静态内部类的构造方法");
        }
        public void method(){
//            System.out.println(num);
            m();
            System.out.println("静态内部类的方法");
        }
    }
    public static void m(){
        System.out.println("外部类的普通方法");
    }
}
